package com.Babysleep.Interface;

import android.os.Handler;

public class ListenHandler extends Handler {
	protected boolean need_send = false;
	protected int delay=0;
	public ListenHandler(int delay) {
		super();
		this.delay=delay;
	}
	public void start() {
		need_send = true;
		sendEmptyMessageDelayed(1, delay);
	}

	public void pause() {
		need_send = false;
	}

	public void restart() {
		need_send = true;
		sendEmptyMessageDelayed(1, delay);
	}

	public void stop() {
		need_send = false;
	}
}
